gsk: Add runtime checks for F16C
authorMatthias Clasen <mclasen@redhat.com>
Thu, 8 Apr 2021 01:29:21 +0000 (21:29 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 8 Apr 2021 02:21:23 +0000 (22:21 -0400)
commit885a6b8ebc2acc7915c7fc7d8fe814c1d20d8aaf
tree0e3b5bb26c8705f33788940e33cbc0244c4d9020
parent9d81c129fc34b489d51bd314ec540bbd6de9794b
gsk: Add runtime checks for F16C

Use an IFUNC resolver to determine whether we can use
intrinsics for FP16 conversion. This requires the functions
to be no longer inline.

Sadly, it turns out that __builtin_cpu_supports ("f16c")
doesn't compile on the systems where we want it to prevent
us from getting a SIGILL at runtime.
gsk/meson.build
gsk/ngl/fp16.c [new file with mode: 0644]
gsk/ngl/fp16private.h
meson.build